<ng-template #dialog let-data let-ref="dialogRef">
  <nb-card style="min-width:800px">
    <nb-card-header>新建楼栋</nb-card-header>
    <nb-card-body style="max-height: 400px;overflow: auto;">
      <form class="form-group">
        <div *ngFor="let i of data">
          <label>{{i.title}}</label>
          <input nbInput fullWidth #inputs>
        </div>
      </form>
    </nb-card-body>
    <nb-card-footer>
      <button nbButton status="danger" (click)="ref.close()">Cancel</button>
      <button nbButton status="success" (click)="ref.close(true)">Submit</button>
    </nb-card-footer>
  </nb-card>
</ng-template>
<nb-card>
  <nb-card-header>
    条件筛选
  </nb-card-header>
  <nb-card-body>
    <input nbInput class="margin" type="text" placeholder="单元编号" [(ngModel)]="unitNo">
    <input nbInput class="margin" type="text" placeholder="单元名称" [(ngModel)]="unitName">
    <button nbButton class="margin" status="info" (click)="filter()">搜索</button>
  </nb-card-body>
</nb-card>
<nb-card>
  <nb-card-header>
    单元档案
  </nb-card-header>

  <nb-card-body>
    <button nbButton status="info"  size="small" (click)="openAddPrompt(dialog)">增加</button>
    <ng2-smart-table [settings]="settings" [source]="source" (deleteConfirm)="onDeleteConfirm($event)" (editConfirm)="onEditConfirm($event)">
    </ng2-smart-table>
  </nb-card-body>
</nb-card>

